/* Bring in data from 1_Data_Cleaning.do */
clear all
use "data/outputs/clean_mm.dta", clear 



/* Table C3 */
corr strong_leader expert_rule military_rule antidemoc wvs_avg exp1_support exp2_support exp2_consistent  



/* Table C4 */
gen male = (gender_pre == 2)
replace male = . if gender_pre == .

eststo exp1: reg antidemoc resp_age 
eststo exp2: reg antidemoc resp_age education male 
eststo exp3: reg exp1_support resp_age
eststo exp4: reg exp1_support resp_age education male 
eststo exp5: reg exp2_support resp_age  
eststo exp6: reg exp2_support resp_age education male 
eststo exp7: reg exp2_consistent resp_age 
eststo exp8: reg exp2_consistent resp_age education male 

esttab exp1 exp2 exp3 exp4 exp5 exp6 exp7 exp8 /*
*/ using "outputs/TableC4.tex", b(2) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) /*
*/ mtitles("Q12" "Q12" "Q15" "Q15" "Q18" "Q18" "Q19" "Q19") /*
*/ varlabels(resp_age "Age" education "Education" /*
*/ male "Male" _cons "Constant")  se r2 label replace



/* Table C5 */ 
eststo exp9: reg exp1_support rep ib3.exp1_scenario, robust  
eststo exp10: reg exp1_support rep rep##ib3.exp1_scenario, robust 
eststo exp11: reg exp2_support rep copartisan i.exp2_scenario, robust 
eststo exp12: reg exp2_support rep copartisan rep##copartisan i.exp2_scenario, robust  
eststo exp13: reg exp2_consistent rep copartisan i.exp2_scenario, robust 
eststo exp14: reg exp2_consistent rep copartisan rep##copartisan i.exp2_scenario, robust  

esttab exp9 exp10 exp11 exp12 exp13 exp14 /*
*/ using "outputs/TableC5.tex", b(2) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) /*
*/ mtitles("Q15" "Q15" "Q18" "Q18" "Q19" "Q19") /*
*/ keep(rep 2.exp1_scenario 1.exp1_scenario 1.rep#1.exp1_scenario 1.rep#2.exp1_scenario /*
*/		copartisan 1.rep#1.copartisan 1.exp2_scenario 2.exp2_scenario 3.exp2_scenario _cons) /*
*/ varlabels(rep "Republican" 2.exp1_scenario "Gridlock" 1.exp1_scenario "Other-party Extremism" /*
*/ 			 1.rep#2.exp1_scenario "Rep $\times$ Gridlock" 1.rep#1.exp1_scenario "Rep $\times$ Other-party Extremism" /*
*/ 			 copartisan "Co-partisan" 1.rep#1.copartisan "Republican $\times$ Co-partisan" /*
*/			 1.exp2_scenario "Blocked, Voter Protest" 2.exp2_scenario "Blocked, Court Action" 3.exp2_scenario "Succeeded" /*
*/ 	 		  _cons "Constant")  se r2 label replace



/* Table C6 */
gen sample3=1 if spillover!=. & how_democ!=. /* define sample  */
eststo exp35a: reg spillover i.exp2_scenario if sample3==1, robust 
eststo exp35b: reg spillover i.exp2_scenario if exp2_attention == 1 & sample3==1, robust  
eststo exp36a: reg how_democ i.exp2_scenario   if sample3==1, robust 
eststo exp36b: reg how_democ i.exp2_scenario if exp2_attention == 1 & sample3==1, robust   

esttab exp35a exp35b exp36a exp36b /*
*/ using "outputs/TableC6.tex", b(3) star(+ 0.10 * 0.05 ** 0.01 *** 0.001) /*
*/ keep (1.exp2_scenario 2.exp2_scenario 3.exp2_scenario _cons) /*
*/ mgroups("\textbf{Will Governor's Plan Pass}" "\textbf{How Democratic is US}", pattern(1 0 1 0 ) /*
*/ span prefix(\multicolumn{@span}{c}{) suffix(}) erepeat(\cmidrule(lr){@span})) nomtitles /*
*/ varlabels(1.exp2_scenario "Blocked, Voter Protest" 2.exp2_scenario "Blocked, Court Action" 3.exp2_scenario "Succeeded"  _cons "Constant (No pushback mean)") /*
*/ se r2 label replace fragment
